package com.weishenai.customerassistant.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.weishenai.customerassistant.entity.sys.SysUserEntity;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author weishenai
 * @since 2021-11-27
 */
public interface SysUserService extends IService<SysUserEntity> {
    SysUserEntity getByUsername(String username);

    String getUserAuthorityInfo(Long userId);

    /***
     * @Description: 清除某个用户的权限信息
     * @Param: [username]
     * @return: void
     * @Author: weishenai
     * @Date: 2021/11/28
     */
    void clearUserAuthorityInfo(String username);

    /**
     * @Description: 清除所有与角色关联的用户的权限信息
     * @Param: [roleId]
     * @return: void
     * @Author: weishenai
     * @Date: 2021/11/28
     */
    void clearUserAuthorityInfoByRoleId(Long roleId);

    /**
     * @Description: 删除所有与该菜单关联的所有的用户的权限信息
     * @Param: [menuId]
     * @return: void
     * @Author: weishenai
     * @Date: 2021/11/28
     */
    void clearUserAuthorityInfoByMenuId(Long menuId);

    /**
     * @Description: 分页查询
     * @Param: [name, pageSize, currentPage]
     * @return: java.util.List<com.weishenai.blog.entity.sys.SysUserEntity>
     * @Author: weishenai
     * @Date: 2021/12/12
     */
    Page<SysUserEntity> selectPage(String name,Integer currentPage, Integer pageSize );
}
